package com.czxy.demo01;

import java.util.Random;

/**
 * Created by hp on 2020/1/30.
 */
public class Test05 {
    public static void main(String[] args) {
        int i = new Random().nextInt(9999)+1;
        String s = String.valueOf(i);
        if (s.length()!=4){
            for (int j = 0; j <=(4-s.length()) ; j++) {
                s="0"+s;
            }
        }
        System.out.println(s);
    }
}
